package com.gxar.timeline.server.base.model.hmd.mapper;

import com.gxar.timeline.server.base.model.hmd.vo.PictureVO;
import com.gxar.timeline.server.db.model.ProductPictureEntity;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author Linsy
 * @version 1.0
 * @created 2023/9/22 10:45 AM
 */
@Mapper
public interface ProductPictureMapStruct {
    ProductPictureMapStruct INSTANCE = Mappers.getMapper(ProductPictureMapStruct.class);

    /**
     * 实体转视图
     *
     * @param entity 实体
     * @return 视图
     */
    PictureVO entityToVo(ProductPictureEntity entity);

    /**
     * 实体转视图
     *
     * @param entityList 实体
     * @return 视图
     */
    List<PictureVO> entitiesToVo(List<ProductPictureEntity> entityList);

    ProductPictureEntity voToEntity(PictureVO vo);

    List<ProductPictureEntity> voListToEntities(List<PictureVO> vos);
}
